package com.gaocf.designpatterns.behavior.strategy;

/**
 * @author gaocf
 */
public class DiscountCash extends Cash {
    //打折点
    private double discountPoint;

    public double getDiscountPoint() {
        return discountPoint;
    }

    public void setDiscountPoint(double discountPoint) {
        this.discountPoint = discountPoint;
    }


    public DiscountCash(double discountPoint) {
        this.discountPoint = discountPoint;
    }

    @Override
    public double calculateRealCash(double money) {
        return money * discountPoint;
    }
}
